package com.mingqijia.gassafety.webserver.request;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * @author wanghai
 * @since 2022-02-24
 */

@ApiModel("客户信息")
@Data
public class ConsumerRequest {

    private Integer id;

    @ApiModelProperty(value = "名字")
    private String name;

    @ApiModelProperty(value = "所属行业 -字典名称Industry_type")
    @NotNull(message = "行业类型不能为空")
    private String industryType;

    @ApiModelProperty(value = "地址(详细)")
    private String address;

    @ApiModelProperty(value = "行政区编码")
//    @NotNull(message = "行政区编码不能为空.")
    private String adCode;

    @ApiModelProperty(value = "经度")
    private Double positionLon;

    @ApiModelProperty(value = "纬度")
    private Double positionLat;

    @ApiModelProperty(value = "备注 200字以内")
    @Size(max=200, message = "备注在200字以内")
    private String remark;

    @ApiModelProperty(value = "联系人列表")
    @Size( max=10 ,message = "联系人最多10位")
    @Valid
    List<ContactsRequest> contactsList;

    @ApiModelProperty(value = "户号")
    private String subsCode;

    @ApiModelProperty(value = "组织编码")
    private String orgCode;

    @ApiModelProperty(value = "户名")
    private String custName;

    @ApiModelProperty(value = "户址")
    private String custAddress;

    @ApiModelProperty(value = "户主手机号")
    private String custPhone;

    @ApiModelProperty(value = "户主 用户类型")
    private String custType;

    @ApiModelProperty(value = "户主 用户类型code")
    private String custTypeCode;

    @ApiModelProperty(value = "气户状态")
    private String custStatus;

    @ApiModelProperty(value = "安装地址")
    private String installationAddress;

    @ApiModelProperty(value = "客户地址")
    private String customerAddress;

    @ApiModelProperty(value = "新增类型 1-导入 2-新增(默认)")
    private Integer type = 2;

    @ApiModelProperty(value = "是否自动分配")
    private Integer funcAreaAllocat;

    @ApiModelProperty(value = "功能区域")
    private ConsumerFuncAreaRequest funcArea;

    //设备检定日期
    @ApiModelProperty(value = "设备检定日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date verificationTime;

    @ApiModelProperty(value = "套餐id")
    private Integer pkgId;

    @ApiModelProperty(value = "套餐名称")
    private String pkgName;

}
